hvm: rombios interface for HVM S3
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 20 May 2008 13:36:05 +0000 (14:36 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 20 May 2008 13:36:05 +0000 (14:36 +0100)
commit232cae0f1c9ad71f084b897af8b4f83d67467f46
tree2c4f76e4cd20d01ce4323df42c229c33ff94430b
parent367722ab70c62591fe2fad263c9be56bfd425c8b
hvm: rombios interface for HVM S3
 - add S3 package in ACPI DSDT table. Guest OS will get S3 value from
   this package and write the value to PM1A control register to
   trigger S3 suspend.
 - Add S3 resume logic in rombios post code. the CMOS shutdown register
   is used to indicate if this is a S3 resume.
 - if it is s3 resume, rombios will get wakeup vector from ACPI FACS
   table and jump to wakeup vector. Per ACPI spec, the wakeup vector
   jumping must be the forms CS:IP, in which CS=3D(wakeup vector>>4)
   IP=3D(wakeup vector)&0xF, for example, for vector=3D0x12345,
   CS:IP=3D0x1234:0x5

Note: clobber_entry_point will clobber the post entry, which make S3
resume not work. We will directly jmp to POST Entry if it in S3
Resume path.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Ke Liping <liping.ke@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/firmware/hvmloader/acpi/dsdt.asl
tools/firmware/hvmloader/acpi/dsdt.c
tools/firmware/rombios/rombios.c